package main

import "fmt"

/*
使用make创建
   map[key]value
 */
func main() {

	//var m map[int]string = make(map[int]string)
	//m := make(map[int]string)
	var m map[int]string
	m = map[int]string{}
	fmt.Println(m)

    m[1] = "ok"
    m[2] = "no"
    fmt.Println(m)

    a := m[1]
    fmt.Println(a)

    //删除对应的键值对
    delete(m, 1)
    fmt.Println("delete: ",m[1])
}